package aos.ydksxt.dao;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * Created by Stiofan on 2017/3/2.
 */
@Entity
@Table(name = "CS_BD_TJDY")
public class CsBdTjdy {
    private String tjdyUuid;
    private String bddyUuid;
    private String tjid;
    private String tjmc;
    private String tjlx;
    private BigDecimal xssx;
    private BigDecimal xscd;
    private String lrrDm;
    private Timestamp lrrq;
    private String xgrDm;
    private Timestamp xgrq;

    @Id
    @Column(name = "TJDY_UUID", nullable = false, length = 32)
    public String getTjdyUuid() {
        return tjdyUuid;
    }

    public void setTjdyUuid(String tjdyUuid) {
        this.tjdyUuid = tjdyUuid;
    }

    @Basic
    @Column(name = "BDDY_UUID", nullable = true, length = 32)
    public String getBddyUuid() {
        return bddyUuid;
    }

    public void setBddyUuid(String bddyUuid) {
        this.bddyUuid = bddyUuid;
    }

    @Basic
    @Column(name = "TJID", nullable = true, length = 20)
    public String getTjid() {
        return tjid;
    }

    public void setTjid(String tjid) {
        this.tjid = tjid;
    }

    @Basic
    @Column(name = "TJMC", nullable = true, length = 20)
    public String getTjmc() {
        return tjmc;
    }

    public void setTjmc(String tjmc) {
        this.tjmc = tjmc;
    }

    @Basic
    @Column(name = "TJLX", nullable = true, length = 20)
    public String getTjlx() {
        return tjlx;
    }

    public void setTjlx(String tjlx) {
        this.tjlx = tjlx;
    }

    @Basic
    @Column(name = "XSSX", nullable = true, precision = 0)
    public BigDecimal getXssx() {
        return xssx;
    }

    public void setXssx(BigDecimal xssx) {
        this.xssx = xssx;
    }

    @Basic
    @Column(name = "XSCD", nullable = true, precision = 6)
    public BigDecimal getXscd() {
        return xscd;
    }

    public void setXscd(BigDecimal xscd) {
        this.xscd = xscd;
    }

    @Basic
    @Column(name = "LRR_DM", nullable = true, length = 11)
    public String getLrrDm() {
        return lrrDm;
    }

    public void setLrrDm(String lrrDm) {
        this.lrrDm = lrrDm;
    }

    @Basic
    @Column(name = "LRRQ", nullable = true)
    public Timestamp getLrrq() {
        return lrrq;
    }

    public void setLrrq(Timestamp lrrq) {
        this.lrrq = lrrq;
    }

    @Basic
    @Column(name = "XGR_DM", nullable = true, length = 11)
    public String getXgrDm() {
        return xgrDm;
    }

    public void setXgrDm(String xgrDm) {
        this.xgrDm = xgrDm;
    }

    @Basic
    @Column(name = "XGRQ", nullable = true)
    public Timestamp getXgrq() {
        return xgrq;
    }

    public void setXgrq(Timestamp xgrq) {
        this.xgrq = xgrq;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CsBdTjdy csBdTjdy = (CsBdTjdy) o;

        if (tjdyUuid != null ? !tjdyUuid.equals(csBdTjdy.tjdyUuid) : csBdTjdy.tjdyUuid != null) return false;
        if (bddyUuid != null ? !bddyUuid.equals(csBdTjdy.bddyUuid) : csBdTjdy.bddyUuid != null) return false;
        if (tjid != null ? !tjid.equals(csBdTjdy.tjid) : csBdTjdy.tjid != null) return false;
        if (tjmc != null ? !tjmc.equals(csBdTjdy.tjmc) : csBdTjdy.tjmc != null) return false;
        if (tjlx != null ? !tjlx.equals(csBdTjdy.tjlx) : csBdTjdy.tjlx != null) return false;
        if (xssx != null ? !xssx.equals(csBdTjdy.xssx) : csBdTjdy.xssx != null) return false;
        if (xscd != null ? !xscd.equals(csBdTjdy.xscd) : csBdTjdy.xscd != null) return false;
        if (lrrDm != null ? !lrrDm.equals(csBdTjdy.lrrDm) : csBdTjdy.lrrDm != null) return false;
        if (lrrq != null ? !lrrq.equals(csBdTjdy.lrrq) : csBdTjdy.lrrq != null) return false;
        if (xgrDm != null ? !xgrDm.equals(csBdTjdy.xgrDm) : csBdTjdy.xgrDm != null) return false;
        if (xgrq != null ? !xgrq.equals(csBdTjdy.xgrq) : csBdTjdy.xgrq != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = tjdyUuid != null ? tjdyUuid.hashCode() : 0;
        result = 31 * result + (bddyUuid != null ? bddyUuid.hashCode() : 0);
        result = 31 * result + (tjid != null ? tjid.hashCode() : 0);
        result = 31 * result + (tjmc != null ? tjmc.hashCode() : 0);
        result = 31 * result + (tjlx != null ? tjlx.hashCode() : 0);
        result = 31 * result + (xssx != null ? xssx.hashCode() : 0);
        result = 31 * result + (xscd != null ? xscd.hashCode() : 0);
        result = 31 * result + (lrrDm != null ? lrrDm.hashCode() : 0);
        result = 31 * result + (lrrq != null ? lrrq.hashCode() : 0);
        result = 31 * result + (xgrDm != null ? xgrDm.hashCode() : 0);
        result = 31 * result + (xgrq != null ? xgrq.hashCode() : 0);
        return result;
    }
}
